package com.yc.thread.interrupte;

public class InterrupteSleep {
	
	public void m1() {
		Thread T1 = new Thread(() -> {
			System.out.println("------------1");
			try {
				Thread.sleep(10000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			System.out.println("------------2");
		});
		T1.start();
		
		try {
			Thread.sleep(1000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		
		System.out.println("-----------interrupt--");
		T1.interrupt();
		System.out.println("-----------over");
	}

	public static void main(String[] args) {
		InterrupteSleep ts = new InterrupteSleep();
		ts.m1();

	}

}
